package com.geotmt.billingcenter.config.modelswitch;

import lombok.Data;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
import org.springframework.stereotype.Component;

/**
 * @Description hadoop 配置类 开关(暂时不可用)
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/3/16 19:24
 * @Version     v1
 **/
@Component
@Data
public class HiveCondition implements Condition {

//    @Value("${hive.open}")
    private boolean open;

    @Override
    public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
        if(open){
            return true;
        }
        return false;
    }
}
